# tasks/celery_app.py

from celery import Celery
from config.celery_config import CeleryConfig

# 创建Celery实例
celery_app = Celery(
    "multimodal_rag_tasks",
    broker=CeleryConfig.BROKER_URL,
    backend=CeleryConfig.RESULT_BACKEND,
    include=['tasks.file_tasks', 'tasks.vector_tasks']
)

# 应用Celery配置
celery_app.conf.update(CeleryConfig.get_config())

if __name__ == '__main__':
    celery_app.start() 